From: Ralph Schleicher Date: Sun, 8 May 2011 18:34:51 +0000 (-0400) Subject: Expand file names during browse-url-of-dired-file (Bug#8259). X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~3884 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=25a8332b1a7eb94610b1db09e312e7c77dfee0be;p=emacs.git Expand file names during browse-url-of-dired-file (Bug#8259). * lisp/net/browse-url.el (browse-url-of-dired-file): Allow browsing of special file names `.' and `..'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df3575e56ff..0670ca30830 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,9 @@ * progmodes/perl-mode.el (perl-imenu-generic-expression): Only match variables declared via `my' or `our' (Bug#8261). + * net/browse-url.el (browse-url-of-dired-file): Allow browsing of + special file names `.' and `..' (Bug#8259). + 2011-05-08 Chong Yidong * progmodes/grep.el (grep-mode-font-lock-keywords): Remove diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 8f91fbb26b1..c1ec3f0ed13 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -769,7 +769,10 @@ narrowed." (defun browse-url-of-dired-file () "In Dired, ask a WWW browser to display the file named on this line." (interactive) - (browse-url-of-file (dired-get-filename))) + (let ((tem (dired-get-filename t t))) + (if tem + (browse-url-of-file (expand-file-name tem)) + (error "No file on this line")))) ;;;###autoload (defun browse-url-of-region (min max)